package com.koron.system.userOrg.controller;

import com.koron.bean.base.Response;
import com.koron.bean.query.PageQuery;
import com.koron.system.userOrg.bean.po.AppUserOrgPo;
import com.koron.system.userOrg.service.AppUserOrgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName AppUserOrgController
 * @description
 * @Author zhouj
 * @Date 2021/11/22 9:59
 */
@Api(tags = "人员组织关联")
@RestController
@RequestMapping("/appUserOrg")
public class AppUserOrgController {

    @Autowired
    AppUserOrgService appUserOrgService;

    @ApiOperation(value = "新增人员组织关联")
    @PostMapping("/insert")
    public Response insert(@RequestBody AppUserOrgPo appUserOrg) {
        return Response.ok(appUserOrgService.insert(appUserOrg));
    }

    @ApiOperation(value = "更新人员组织关联")
    @PutMapping("/update")
    public Response update(@RequestBody AppUserOrgPo appUserOrg) {
        return Response.ok(appUserOrgService.update(appUserOrg));
    }

    @ApiOperation(value = "查询人员组织关联")
    @GetMapping("/queryPageList")
    public Response queryPageList(AppUserOrgPo appUserOrg, PageQuery pageQuery) {
        return Response.ok(appUserOrgService.queryPageList(appUserOrg, pageQuery));
    }


}
